//
//  UIScrollView+BLHeaderFooter.h
//  BasketBallLeagues
//
//  Created by kenshin on 4/23/17.
//  Copyright © 2017 kenshin. All rights reserved.
//

#import <UIKit/UIKit.h>

/// 下拉刷新和上拉加载控件
@interface UIScrollView (BLHeaderFooter)

/// 设置下拉刷新头部控件
- (void)bl_setHeaderWithRefreshingBlock:(void(^)())refreshingBlock;
/// 开始下拉刷新
- (void)bl_beginHeaderRefreshing;
/// 结束下拉刷新
- (void)bl_endHeaderRefreshing;
/// 是否下拉刷新中
- (BOOL)bl_isHeaderRefreshing;

/// 设置上拉加载底部控件
- (void)bl_setFooterWithRefreshingBlock:(void(^)())refreshingBlock;
- (void)bl_setFooterWithNoMoreTitle:(NSString *)noMoreTitle
                    refreshingBlock:(void (^)())refreshingBlock;
/// 结束上拉加载
- (void)bl_endFooterRefreshing;
/// 结束上拉加载并设置无更多数据状态
- (void)bl_endFooterRefreshingWithNoMoreData;
/// 结束上拉加载并重置为闲置状态
- (void)bl_resetFooterToIdle;
/// 是否上拉加载中
- (BOOL)bl_isFooterRefreshing;
/// 设置上拉加载自动隐藏
- (void)bl_setFooterAutomaticallyHidden:(BOOL)automaticallyHidden;
/// 移除上拉加载视图
- (void)bl_removeFooterRefreshing;

@end
